package com.llb666.shop.items.infrastructure.conver;

import com.llb666.shop.items.domain.entity.Category;
import com.llb666.shop.items.infrastructure.po.CategoryPo;
import org.mapstruct.Mapper;
import org.mapstruct.ReportingPolicy;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 商品分类对象转换器.
 *
 * @author llb66
 */
@Mapper(unmappedTargetPolicy = ReportingPolicy.IGNORE)
public interface CategoryCvt {

    CategoryCvt INSTANCE = Mappers.getMapper(CategoryCvt.class);

    CategoryPo do2po(Category category);

    Category po2do(CategoryPo categoryPo);

    List<Category> po2doList(List<CategoryPo> categoryPoList);
}
